<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <title>手写双向绑定原理</title>
  </head>

  <body>
    <div id="app">
      <span>姓名: {{ name }}</span>
      <input type="text" v-model="name" />

      <span>身高: {{ info.height }}</span>
      <input type="text" v-model="age" />
    </div>
    <script type="text/javascript" src="./vue.js"></script>
    <script type="text/javascript">
      const vm = new Vue({
        el: '#app',
        data: {
          name: '小明',
          age: 16,
          info: {
            height: 1.8,
          },
        },
      });
    </script>
  </body>
</html>
